<!DOCTYPE html>
<html>
<header>
    <meta charset="UTF-8">
    <title>你的世界，由你做主</title>
    <script type="text/javascript" src="http://101.201.102.86/js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="http://101.201.102.86/js/jquery.qrcode.min.js"></script>
    <link rel="stylesheet" href="https://unpkg.zhimg.com/element-ui/lib/theme-chalk/index.css">
    <style>
        body {
            background-color: rgb(177, 173, 173);
        }

        .describeLeft {
            width: 45%;
            float: left;
        }

        .describeLeft h3 {
            text-align: center;
            margin-top: 0%;
            margin-bottom: 0%;
        }

        .describeLeft video {
            height: 100%;
            width: 100%;
            object-fit: fill
        }

        .describeRight {
            width: 55%;
            float: left;
        }

        .describeRight li {
            list-style-type: none;
            color: black;
            font-size: 1em;
            margin-top: 5px;
        }

        .describeRight span {
            color: red
        }

        .payBox {
            position: relative;
            left: 15%;
            width: 70%;
        }

        .hb {
            position: relative;
            left: 15%;
            width: 80%;
        }

        .hb img {
            width: 280px;
            height: 370px;
        }

        .sh {
            position: relative;
            left: 15%;
            width: 70%;
        }
    </style>
</header>

<body>
    <div id="app">
        <div class="describeLeft">
            <h3>激活教程，视频中 {{ide}} 版本2020.3</h3>
            <video ref='video' :src="activeVideo" controls="controls">
                您的浏览器不支持 video 标签。
            </video>
            <br/>
            <br/>
            <h3>免费更新大群和成功案例</h3>
            <div class="sh">
                <el-carousel height="400px">
                    <el-carousel-item v-for="item in items" :key="item">
                        <img class="element-img" alt="" :src="item">
                    </el-carousel-item>
                </el-carousel>
            </div>
        </div>
        <div class="describeRight">
            <ul>
                <li>
                    <i class="el-icon-success"></i>
                    <span>{{amount}} RMB</span>你能买到什么？一瓶矿泉水然后坐车回家刚好够！但现在只需要 <span>{{amount}} RMB</span>就可以永久激活{{ide}}.
                </li>
                <li>
                    <i class="el-icon-money"></i>
                    我们支持 {{ide}} 全版本激活（最新发布2020.3都支持）。现在扫码下单免费赠送白嫖科学上网教程，数量有限先到先得!
                    <br />
                    <div class="payBox">
                        <p>订单编号：<span>{{orderNo}} 金额：{{amount}} 元</span></p>
                        <div id="qrcode">
                            <span v-if="noticeShow">如果没有支付码请刷新本页面</span>
                        </div>
                        <p class="el-icon-unlock">解压密码(请惠存)：<span>{{password}}</span></p>
                        <p style="margin-top: 0%;"><span>重要！支付完成自动返回密码，请不要关闭本页面，遇到问题请及时联系客服!!!</span></p>
                    </div>
                </li>
                <li>
                    <i class="el-icon-warning"></i>
                    首先在此郑重声明，本人诚信做生意，旨在为你带来实惠！本补丁绝对有效，无效全额退款（如果骗你全家死绝！）
                </li>
                <li>
                    <i class="el-icon-service"></i>
                    客服 7:00 ~ 24:00 在线，欢迎各位大佬来扰。客服联系方式：QQ <span>1129710485</span>
                    <el-button type="success" icon="el-icon-service" size="mini">
                        <a href="tencent://message/?uin=1129710485" style="text-decoration:none">客服</a>
                    </el-button>
                </li>
                <li>
                    <i class="el-icon-sugar"></i>
                    福利赠送：购买本补丁<span></span><a href="https://www.789zhao.com/blog/J8LT1YRVGN03.html"
                        target="_blank">免费赠送白嫖科学上网教程。</a></span> <a href="http://www.google.com"
                        target="_blank">google</a>, <a href="http://www.youtube.com" target="_blank">youtube</a>
                    等外网地址轻松访问
                    <div class="payBox">
                        <p class="el-icon-key">福利邀请码：<span>{{kxcode}}</span></p>
                    </div>
                </li>
                <li>
                    <i class="el-icon-coin"></i>
                    支付前，扫一扫下侧的红包，有概率获得 <span> 8.8 元</span> 大红包哦。等于帮你赚钱！亲记得消费你的红包哦
                    <div class="hb">
                        <img src="http://101.201.102.86/images/hb.png" alt="" />
                        <img src="http://101.201.102.86/images/bg.png" alt="" />
                    </div>
                </li>
            </ul>
        </div>
    </div>
</body>
<script src="https://unpkg.zhimg.com/vue/dist/vue.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.zhimg.com/element-ui/lib/index.js"></script>
<script>
    let addr = "101.201.102.86"
    //let addr = "localhost"
    var createWebSocket = (function () {
        return function (urlValue) {
            if (window.WebSocket) return new WebSocket(urlValue);
            if (window.MozWebSocket) return new MozWebSocket(urlValue);
            return false;
        }
    })();
    new Vue({
        el: '#app',
        data: function () {
            return {
                amount: 0,
                password: "******",
                qrcodeShow: true,
                noticeShow: true,
                kxcode: "******",
                items: [],
                activeVideo: "",
                orderNo: '',
                orderNoShow: false,
                ide: 'webstorm'
            }
        },
        mounted: function () {
            this.init()
        },
        methods: {
            init: function () {
                let tradeNo = new Date().getTime()
                this.socket = createWebSocket(`ws://${addr}?tradeNo=${tradeNo}&ide=${this.ide}Eval&active=active`)
                this.socket.onopen = () => {
                    $(document).ready(() => {
                        //$('#qrcode').qrcode("https://www.baidu.com");
                    })
                }
                this.socket.onmessage = (serverPush) => {
                    let data = JSON.parse(serverPush.data)
                    if (data.code == 0) {
                        if (data.type == 1) {
                            $('#qrcode').qrcode(data.qrUrl);
                            this.orderNo = tradeNo;
                            this.orderNoShow = true;
                            this.noticeShow = false;
                            this.amount = data.amount;
                            this.$refs.video.src = `http://${data.active.addr}/${this.ide}xx.mp4`;
                            for (let i = 0; i < data.success.num; i++) {
                                this.items.push(`http://${data.success.addr}/${i}.png`)
                            }
                        } else if (data.type == 2) {
                            this.password = data.unzip;
                            this.kxcode = data.gift;
                            this.qrcodeShow = false;
                        }
                    }
                }

                this.socket.onclose = () => {
                    console.log("connection has disconnected")
                }

                this.socket.onerror = () => {
                    console.error("unknown error")
                }
            }
        }
    })
</script>

</html>